Starting from dhtmlxGrid 1.3 integration in existing FORM is possible.
To enable integration next things must be done
dhtmlxGrid_form.js included in page
Grid container placed inside existing FORM tag
By default grid sumbit mode is "Submit-only-changed-rows", which can also be anabled with submitOnlyChanged method.
As result while form submit grid will include all modified fields inside FORM scoop
The naming of fields is next [GRIDID]_[ROWID]_[CELLINDEX]
Where
GRIDID - id of container used for grid
ROWID - id of row in which value was changed
CELLINDEX - index of cell inside row
List of added row IDs will be submitted in the following parameter:
[GRIDID]_ROWS_ADDED
Where
GRIDID - id of container used for grid
List of deleted row IDs will be submitted in the following parameter:
[GRIDID]_ROWS_DELETED
Where
GRIDID - id of container used for grid
Another mode of grid submit is "Submit-selected-rows", which can be anabled with submitOnlySelected method.
If activated, then selected row id(s) will be passed to server on submit.
Starting from dhtmlxGrid 1.3, in addition to default grid reloading through
grid.clearAll()
grid.reloadXML(URL);
new refresh method added, which just update values of existing rows without reconstructing ( as
result it doesn't cause any visual glitches in grid, and works significently faster than full grid
reconstruction )
grid.updateFromXML(URL)
The format of XML exactly the same as for initialization. Grid will update each row in grid with the same ID with data
from XML.
Starting from dhtmlxGrid 1.3 by including dhtmlXGrid_undo.js your enable undo|redo functionality.
All user edit actions will be saved in unlimited undo history. ( modification caused by API calls will not be
stored in history )
mygrid.enableUndoRedo();
...
mygrid.doUndo()
mygrid.doRedo()
Starting from dhtmlxGrid 1.3 additional selection mode supported in grid - block selection.
To activate mode you need to include dhtmlXGrid_selection.js file in project.
In block selection mode you can select any block of content and copy it to clipboard ( also block paste from clipboard is possible)
Starting from dhtmlxGrid 1.3 Integration with dhtmlxCombo is possible.
The grid supports "combo" excell type which transformed to dhtmlxCombobox component. "Combo" excell supports all modes of the dhtmlxcombo.
There are two ways for combo setting definition:
For whole column
For special cell
Combo loading and representation modes are set by especial attributes in the xml:
xmlcontent - in this case, options can be defined directly in the grid xml
source - the source of the combo xml
editable (boolean, 1 by default)
filtering (boolean, 0 by default), enables filtering mode (the same as enableFilteringMode for the combo)
auto (boolean, 0 by default) Enables autocomplete mode (the same as enableFilteringMode(mode,source) for the combo)
cache (boolean, the additional parameter for autocomplete mode) - the xml suggestions are cached (the same as enableFilteringMode(mode,source,cache))
sub (boolean,the additional parameter for autocomplete mode)- enable auto load additional suggestions on selecting last loaded option. (the same as enableFilteringMode(mode,source,cache,sub)
Setting "combo" column
For the whole column combo is set in the <column> tag
TEXT
…
TEXTTEXT
Combo value should be set inside <cell> tags:
1
In case of auto complete <cell>value^text</cell> instruction defines value and text:
1^one
Setting "combo" cell
Cell's combo is set as the column's one, the difference is using <cell> tag instead of and that the xmlcontent attribute is always necessary:
1
...
1
In case of autocomplete text should be set with text attribute:
4